import { Injectable } from '@angular/core';
import {Router, ActivatedRoute} from "@angular/router";

@Injectable()
export class ROUTE {
  constructor(private router:Router) {
  }
  showLoginModal():void{
  }
  goLoginView():void{
    console.log("goLoginView");
    this.router.navigate(['login'])
  }
  goAboutView():void{
    this.router.navigate(['about'])
  }
  goHomeView():void{
    this.router.navigate([''])
  }
  goERentingView():void{
    this.router.navigate(['e-renting'])
  }
  gotoRenting(item:any) {
    this.router.navigate([`renting/${item}`]);
    // this.router.navigate([`project/${this.item.id}`,{id:this.item.id}]);
  }
  goPlaceOrderView(item:any):void{
    this.router.navigate([`place_order/${item.id}/${item.payType}`]);
  }
  goContractView():void{
    this.router.navigate([`contract`]);
  }
  goConfirmPaymentView(item?:any):void{
    this.router.navigate([`confirm_payment`,item])
  }
  goFinishedPaymentView(item?:any):void{
    // this.router.navigate(['finished_payment',{id:item.contractId,billNo:item.billNo,money:item.money}]);
    this.router.navigate(['finished_payment']);
  }
  goCooperateView():void{
    this.router.navigate(['cooperate'])
  }
  goLifeServiceView():void{
    this.router.navigate(['life-service'])
  }
  goRentingMallView():void{
    this.router.navigate(['renting-mall'])
  }
  goScoreMallView():void{
    this.router.navigate(['score-mall']);
  }
  goCleaningMallView():void{
    this.router.navigate(['cleaning-mall']);
  }
  goProjectDetailView(item:any):void{
    this.router.navigate([`project/${item.id}`]);
  }
  goMyRentingView():void{
    this.router.navigate(['personal/myrenting']);
  }
  goWechatPaymentView(item:any):void{
    this.router.navigate(['wechatpayment',{pay_info:item}])
  }
  goStoryDetailView():void{
    this.router.navigate(['story']);
  }
  goBalanceView():void{
    this.router.navigate(['personal/mybalance']);
  }
  goRentingMallDetailView(item:any):void{
    this.router.navigate(['rentingMallDetail',{id:item}]);
  }
  goCleaningMallDetailView(item:any):void{
    this.router.navigate(['cleaningMallDetail',{id:item}]);
  }
  goScoreMallDetailView(item:any):void{
    this.router.navigate(['scoreMallDetail',{id:item}]);
  }
  goScoreView():void{
    this.router.navigate(['personal/myscore']);
  }
}
